<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Allemployees.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="layui/css/layui.css" media="all">

  </head>
  
 <body>
 
<table id="demo" lay-filter="test"></table>
 
<script src="layui/layui.js"></script>
<script>
layui.use('table', function(){
  var table = layui.table;
  
  //第一个实例
  table.render({
    elem: '#demo'
    ,height: 315
    ,url: 'Allemployeesservlet' //数据接口
    ,page: true //开启分页
    ,where:{"action":"staffs"}
    ,cols: [[ //表头
      {field: 'sid', title: '员工ID', width:80, sort: true, fixed: 'left'}
      ,{field: 'sname', title: '员工姓名', width:80}
      ,{field: 'ssex', title: '员工性别', width:80, sort: true}
      ,{field: 'sbirth', title: '出生年月', width:80} 
      ,{field: 'sdepartment', title: '员工部门', width: 177}
      ,{field: 'sposition', title: '员工职位', width: 80, sort: true}
      ,{field: 'sphone', title: '员工电话', width: 80, sort: true}
      ,{field: 'swages', title: '员工工资', width: 80}
      ,{field: 'creationtime', title: '创建时间', width: 135, sort: true}
      ,{field: 'modificationtime', title: '修改时间', width: 80}
      ,{field: 'modifier', title: '修改人', width: 80}
    ]]
  });
  
});
</script>
</body>
</html>
